import request from '@/utils/request'
import store from '../../store'
const subSysPrefix = '/webservice'
// 接口信息检索
export function interfaceInfoSelect(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: subSysPrefix + '/InterfaceInfo/select',
    method: 'post',
    data: postselectinfo
  })
}

// 接口信息插入
export function interfaceInfoInsert(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: subSysPrefix + '/InterfaceInfo',
    method: 'post',
    data: postselectinfo
  })
}

// 接口信息更新
export function interfaceInfoUpdate(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: subSysPrefix + '/InterfaceInfo/' + postselectinfo.interfaceInfoId,
    method: 'PUT',
    data: postselectinfo
  })
}

// 接口信息删除
export function interfaceInfoDelete(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: subSysPrefix + '/InterfaceInfo/force',
    method: 'DELETE',
    data: postselectinfo
  })
}

// 获取主键ID
export function getUUID() {
  return request({
    url: '/trade/util/getUuid',
    method: 'GET'
  })
}
